package lookie.app.ui.explorer;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeNode;

import lookie.swing.tree.model.DeferredTreeNodeModel;
import lookie.swing.tree.model.TreeNodeProvider;
import lookie.swing.tree.navigation.Navigator;

public class FileSystemTreeNavigator extends Navigator {

	private TreeNodeProvider provider;

	public FileSystemTreeNavigator(JTree tree, TreeNode root,
			TreeNodeProvider provider) {
		super(tree, root);
		this.provider = provider;
		init();
	}

	@Override
	protected DefaultTreeModel newTreeModel(TreeNode root) {
		return new DeferredTreeNodeModel(root, provider);
	}

}
